﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LABORATORIOCAPS2LIBRES.Analisis
{
    public partial class lblgrupos : Form
    {
        LABORATORIOCAPS2Entities context;
        public lblgrupos()
        {
            InitializeComponent();
        }

        private void bttnGuardar_Click(object sender, EventArgs e)
        {
            Protocolo ProtocoloNuevo = new Protocolo();
            ProtocoloNuevo.fecha = dateTimePicker1.Value.Date;
            ProtocoloNuevo.numeroprotocolo = Convert.ToInt32(txtbnroprotocolo.Text); //validar que no quede vacio
          
            Hemograma HemogramaNuevo = new Hemograma();
            HemogramaNuevo.Hematocrito = txtbhematocrito.Text;

            context.AddToProtocolo(ProtocoloNuevo);
            context.SaveChanges();

            MessageBox.Show("El Protocolo ha sido Guardado con Exito ",
                                                  "Remediar + Redes", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
    }
}